import request from '@/utils/request'
import qs from 'qs'
export function getList(data) {
  return request({
    url: '/user/doctor/list',
    method: 'get',
    params: data
  })
}

export function get(doctorId) {
  return request({
    url: '/user/doctor/' + doctorId,
    method: 'get'
  })
}

export function authAudit(data) {
  return request({
    url: '/user/doctor/audit/auth',
    method: 'post',
    data
  })
}

export function recordAudit(data) {
  return request({
    url: '/user/doctor/audit/record',
    method: 'post',
    data
  })
}

export function doctorOperation(id, status) {
  return request({
    url: '/user/doctor/' + id + '/' + status,
    method: 'get'
  })
}
export function doctorSetTest(id, type) {
  return request({
    url: '/user/doctor/' + id + '/type',
    method: 'get',
    params: { type: type }
  })
}
export function uploadImg(id, status, data) {
  return request({
    url: '/user/doctor/upload/' + id + '/' + status,
    method: 'post',
    data
  })
}

export function updateDoctor(data) {
  return request({
    url: '/user/doctor/update',
    method: 'post',
    data
  })
}

export function uploadDoctorSign(id, data) {
  return request({
    url: '/user/doctor/upload/seal/' + id,
    method: 'post',
    data
  })
}

export function cityList() {
  return request({
    url: '/user/doctor/city/list',
    method: 'get'
  })
}

export function hospitalList(id) {
  return request({
    url: '/user/doctor/hospital/' + id,
    method: 'get'
  })
}

export function department() {
  return request({
    url: '/user/doctor/department',
    method: 'get'
  })
}

export function getRecordInfo(id) {
  return request({
    url: '/user/doctor/record/' + id,
    method: 'get'
  })
}
export function getCityList() {
  return request({
    url: '/user/doctor/city/list',
    method: 'get'
  })
}
export function getStandardList() {
  return request({
    url: '/user/doctor/standard/list',
    method: 'get'
  })
}

export function updateRecordInfo(data) {
  return request({
    url: '/user/doctor/record',
    method: 'post',
    data: data,
    timeout: 15000
  })
}

export function getCommentList(data) {
  return request({
    url: '/user/doctor/consult/comment/list',
    method: 'get',
    params: data
  })
}

export function getComplaintList(data) {
  return request({
    url: '/user/doctor/consult/complaint/list',
    method: 'get',
    params: data
  })
}

export function updateDoctorInfo(data, id) {
  return request({
    url: '/user/doctor/info/' + id,
    method: 'put',
    data
  })
}
